package com.white.hot.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.white.hot.dao.ICrashLogDao;
import com.white.hot.dto.CrashLog;
import com.white.hot.service.CrashLogService;

@Service("crashLogService")
public class CrashLogServiceImpl implements CrashLogService
{
	@Resource
	private ICrashLogDao crashDao;
	
	public void addCrashLog(CrashLog log)
	{
		crashDao.insert(log);
	}

	@Override
	public List<CrashLog> getList(String startTime, String endTime,String brand,String model,String api)
	{
		// TODO Auto-generated method stub
		return crashDao.getList(startTime, endTime, brand, model, api);
	}

	@Override
	public void update(CrashLog log)
	{
		crashDao.updateByPrimaryKey(log);
	}

	@Override
	public CrashLog load(int id)
	{
		return crashDao.selectByPrimaryKey(id);
	}

	@Override
	public List<String> getCategary(int catName)
	{
		return crashDao.getCategary(catName);
	}
}
